﻿

Ext.form.Myimg = Ext.extend(Ext.BoxComponent, {  
    onRender : function(ct, position){  
       if(!this.el){  
            this.el = document.createElement('img');              
            this.el.src = this.src;  
           if(this.forId){  
                this.el.setAttribute('htmlFor', this.forId);  
             }  
         }  
       Ext.form.Label.superclass.onRender.call(this, ct, position);  
     }  
 });  
   
 Ext.reg('myimg', Ext.form.Myimg);